import request from '@/utils/request'

// 登录
export function login(data) {
  return request({
    url: '/sa/user/login',
    method: 'post',
    data
  })
}

// 获取用户信息
export function getUserInfo(data) {
  return request({
    url: '/sa/user/getUserInfo',
    method: 'post',
    data
  })
}

// 退出
export function logout() {
  return request({
    url: '/sc/user/logout',
    method: 'post'
  })
}

// 获取token
export function getUploadToken() {
  return request({
    url: '/sa/user/uploadToken',
    method: 'post'
  })
}

// post 请求（导出excel）
export function exportItemExcel(data) {
  return request({
    url: '/tk/workbench/exportPopulationState',
    method: 'post',
    data: data,
    responseType: 'blob'
  })
}

// 获取字典数据
export function getCommList(data) {
  return request({
    url: '/sc/dataDic/getListByCode',
    method: 'post',
    data
  })
}
